import OrgSelect from './orgSelect'
export default {
  data() {
    return {
      targetUrl: '/orgs',
      expandAll: true,
      template: {
        code: {
          title: '代码',
          value: ''
        },
        name: {
          title: '名称',
          value: ''
        },
        pid: {
          title: '上级组织',
          component: {
            name: OrgSelect,
          }
        }
      },
      columns: [{
          title: 'ID',
          key: 'id',
        },
        {
          title: '代码',
          key: 'code',
        },
        {
          title: '名称',
          key: 'name'
        }
      ],
      rules: {
        code: [{
          required: true,
          message: '请输入代码',
          trigger: 'blur'
        }],
        name: [{
          required: true,
          message: '请输入名称',
          trigger: 'blur'
        }],
      }
    }
  },
}
